package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * 菜品相关接口
 *
 * @Author mr.Du
 * @Date 2025/5/21 2025/5/21
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish> {

    /**
     * 新增菜品口味
     * @param dishFlavor
     */
    int banchInsert(@Param("dishFlavor") List<DishFlavor> dishFlavor);

    /**
     * 分页查询菜品
     * @param dto
     * @return
     */
    List<Dish> page(DishPageQueryDTO dto);
}
